import request from "@/utils/request";

export function getHomeData() {
  return request({
    url: "/wx/home/index",
    method: "get",
  });
}
export function getGoodsListByBrand(params) {
  return request({
    url: "/wx/goods/list",
    method: "get",
    params,
  });
}

export function getBrandDetail(params) {
  return request({
    url: "/wx/brand/detail",
    method: "get",
    params,
  });
}

export function getGoodsDetail(params) {
  return request({
    url: "/wx/goods/detail",
    method: "get",
    params,
  });
}
export function gettopicDetail(params) {
  return request({
    url: "/wx/topic/related",
    method: "get",
    params,
  });
}

export function getmorexpsf(page = 1, limit = 10) {
  return request({
    url: "/wx/goods/list",
    method: "get",
    params: {
      isNew: true,
      page,
      limit,
    },
  });
}

export function getmoreppszg(page = 1, limit = 10) {
  return request({
    url: "/wx/brand/list",
    method: "get",
    params: {
      isNew: true,
      page,
      limit,
    },
  });
}
export function getmorehot(page = 1, limit = 10) {
  return request({
    url: "/wx/goods/list",
    method: "get",
    params: {
      isHot: true,
      page,
      limit,
    },
  });
}
export function getmoreztjx(page = 1, limit = 10) {
  return request({
    url: "/wx/topic/list",
    method: "get",
    params: {
      isHot: true,
      page,
      limit,
    },
  });
}